package com.ffapp.rainmonitorcustom.bean;

import android.text.TextUtils;

import com.ffapp.rainmonitorcustom.util.MyUtils;
import com.ffapp.rainmonitorcustom.R;

public class AlarmListData extends BasisBean {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * NO : 010000000000
	 * GATHERTIME : 2018-09-05 18:25:13
	 * ALARM : 烟感报警
	 * EQUIPNO : null
	 * OFFCOMNO : sm0007
	 * PROCESSINGSTATUS : 0
	 * POSITION : 大楼
	 * STATUS : 1
	 * FIRENAME : null
	 * DEVICETYPE : smoke
	 * OFFCOMNAME : 厦门海底世界有限公司
	 * EQUIPNAME : null
	 * ID : CAA703DC4BE1405494813E7839380760
	 * EQUIPSTATUS : null
	 * PROCESSINGTIME : null
	 * PROCESSOR : null
	 * ROW_NUM : 2
	 * FIRENO : null
	 * MANAGETEL : 5931870
	 * MANAGEMAN : 张家港
	 * NAME : 烟感(海底世界)
	 * ADDRESS : 福建省厦门市思明区鼓浪屿街道厦门海底世界
	 * PROJECTNO : 350203
	 * EQUIPPOSITION : null
	 * EQUIPALARM : null
	 * PROCESSINGRESULT : null
	 */

	private String NO;
	private String GATHERTIME;
	private String ALARM;
	private String EQUIPNO;
	private String OFFCOMNO;
	private int PROCESSINGSTATUS;
	private String POSITION;
	private String STATUS;
	private String STATUSNAME;
	private String FIRENAME;
	private String DEVICETYPE;
	private String OFFCOMNAME;
	private String EQUIPNAME;
	private String ID;
	private String EQUIPSTATUS;
	private String PROCESSINGTIME;
	private String PROCESSOR;
	private int ROW_NUM;
	private String FIRENO;
	private String MANAGETEL;
	private String MANAGEMAN;
	private String NAME;
	private String ADDRESS;
	private String PROJECTNO;
	private String EQUIPPOSITION;
	private String EQUIPALARM;
	private String PROCESSINGRESULT;
	private String IMG;

	public String getNO() {
		return NO;
	}

	public void setNO(String NO) {
		this.NO = NO;
	}

	public String getGATHERTIME() {
		return GATHERTIME;
	}

	public void setGATHERTIME(String GATHERTIME) {
		this.GATHERTIME = GATHERTIME;
	}

	public String getALARM() {
		return ALARM;
	}

	public void setALARM(String ALARM) {
		this.ALARM = ALARM;
	}

	public String getEQUIPNO() {
		return EQUIPNO;
	}

	public void setEQUIPNO(String EQUIPNO) {
		this.EQUIPNO = EQUIPNO;
	}

	public String getOFFCOMNO() {
		return OFFCOMNO;
	}

	public void setOFFCOMNO(String OFFCOMNO) {
		this.OFFCOMNO = OFFCOMNO;
	}

	public int getPROCESSINGSTATUS() {
		return PROCESSINGSTATUS;
	}

    public String getPROCESSINGSTATUSStr() {
        return getPROCESSINGSTATUSStr(PROCESSINGSTATUS);
    }
	public void setPROCESSINGSTATUS(int PROCESSINGSTATUS) {
		this.PROCESSINGSTATUS = PROCESSINGSTATUS;
	}

	public static String getPROCESSINGSTATUSStr(int status){
	    switch (status){
            case 0:
                return "未处理";
            case 1:
                return "误报";
            case 2:
                return "故障";
            case 3:
                return "火警";
            case 4:
                return "屏蔽预警";
            case 5:
                return "异常处理";
            case 6:
                return "其他";
            default:
                return "其他";

        }
    }

	public static String getPROCESSINGSTATUS_Text_color(int status){
		switch (status){
			case 0:
//				return "未处理";
				return "#f0c133";
			case 1:
//				return "误报";
				return "#3579e3";
			default:
//				return "其他";
				return "#e94b1a";

		}
	}
	public static int getPROCESSINGSTATUS_Text_bgcolor(int status){
		switch (status){
			case 0:
//				return "未处理";
				return R.drawable.alarm_process_status_bg_yellow;
			case 1:
//				return "误报";
				return R.drawable.alarm_process_status_bg_blue;
			default:
//				return "其他";
				return R.drawable.alarm_process_status_bg_red;

		}
	}

	public String getPOSITION() {
		return POSITION;
	}

	public void setPOSITION(String POSITION) {
		this.POSITION = POSITION;
	}

	public String getSTATUS() {
		return STATUS;
	}

	public String getSTATUSStr() {
		if(TextUtils.isEmpty(STATUS))      return "正常";
	    switch (STATUS){
            case "0":
                return "正常";
            case "1":
                return "报警";
            case "2":
                return "离线";
                default:
                    return "正常";

        }
	}

    public int getSTATUS_resid() {
		if(TextUtils.isEmpty(STATUS))     return R.drawable.base_circle_green;
        switch (STATUS){
            case "0":
                return R.drawable.base_circle_green;
            case "1":
                return  R.drawable.base_circle_red;
            case "2":
                return  R.drawable.base_circle_yellow;
            default:
                return R.drawable.base_circle_green;

        }
    }


	public void setSTATUS(String STATUS) {
		this.STATUS = STATUS;
	}

	public String getFIRENAME() {
		return FIRENAME;
	}

	public void setFIRENAME(String FIRENAME) {
		this.FIRENAME = FIRENAME;
	}

	public String getDEVICETYPE() {
		return DEVICETYPE;
	}

	public void setDEVICETYPE(String DEVICETYPE) {
		this.DEVICETYPE = DEVICETYPE;
	}

	public String getOFFCOMNAME() {
		return OFFCOMNAME;
	}

	public void setOFFCOMNAME(String OFFCOMNAME) {
		this.OFFCOMNAME = OFFCOMNAME;
	}

	public String getEQUIPNAME() {
		return EQUIPNAME;
	}

	public void setEQUIPNAME(String EQUIPNAME) {
		this.EQUIPNAME = EQUIPNAME;
	}

	public String getID() {
		return ID;
	}

	public void setID(String ID) {
		this.ID = ID;
	}

	public String getEQUIPSTATUS() {
		return EQUIPSTATUS;
	}

	public void setEQUIPSTATUS(String EQUIPSTATUS) {
		this.EQUIPSTATUS = EQUIPSTATUS;
	}

	public String getPROCESSINGTIME() {
		return PROCESSINGTIME;
	}

	public void setPROCESSINGTIME(String PROCESSINGTIME) {
		this.PROCESSINGTIME = PROCESSINGTIME;
	}

	public String getPROCESSOR() {
		return PROCESSOR;
	}

	public void setPROCESSOR(String PROCESSOR) {
		this.PROCESSOR = PROCESSOR;
	}

	public int getROW_NUM() {
		return ROW_NUM;
	}

	public void setROW_NUM(int ROW_NUM) {
		this.ROW_NUM = ROW_NUM;
	}

	public String getFIRENO() {
		return FIRENO;
	}

	public void setFIRENO(String FIRENO) {
		this.FIRENO = FIRENO;
	}

	public String getMANAGETEL() {
		return MANAGETEL;
	}

	public void setMANAGETEL(String MANAGETEL) {
		this.MANAGETEL = MANAGETEL;
	}

	public String getMANAGEMAN() {
		return MANAGEMAN;
	}

	public void setMANAGEMAN(String MANAGEMAN) {
		this.MANAGEMAN = MANAGEMAN;
	}

	public String getNAME() {
		return NAME;
	}

	public void setNAME(String NAME) {
		this.NAME = NAME;
	}

	public String getADDRESS() {
		return ADDRESS;
	}

	public void setADDRESS(String ADDRESS) {
		this.ADDRESS = ADDRESS;
	}

	public String getPROJECTNO() {
		return PROJECTNO;
	}

	public void setPROJECTNO(String PROJECTNO) {
		this.PROJECTNO = PROJECTNO;
	}

	public String getEQUIPPOSITION() {
		return EQUIPPOSITION;
	}

	public void setEQUIPPOSITION(String EQUIPPOSITION) {
		this.EQUIPPOSITION = EQUIPPOSITION;
	}

	public String getEQUIPALARM() {
		return EQUIPALARM;
	}

	public void setEQUIPALARM(String EQUIPALARM) {
		this.EQUIPALARM = EQUIPALARM;
	}

	public String getPROCESSINGRESULT() {
		return PROCESSINGRESULT;
	}

	public String getProcessResultStr() {
		return "未处理";
	}

	public void setPROCESSINGRESULT(String PROCESSINGRESULT) {
		this.PROCESSINGRESULT = PROCESSINGRESULT;
	}

//	public int getStatusTextColr(){
//		if(TextUtils.isEmpty(STATUSNAME))return R.color.grey;
//
//
//		return  R.color.base_text_green;
//	}

	public String getSTATUSNAME() {
		return STATUSNAME;
	}

	public void setSTATUSNAME(String STATUSNAME) {
		this.STATUSNAME = STATUSNAME;
	}

	public String getIMG() {
		return IMG;
	}
	public String getIMG_Real() {
		return MyUtils.getImageUrlHome(IMG);
	}

	public void setIMG(String IMG) {
		this.IMG = IMG;
	}

	public void mergListData(AlarmListData data){
		setIMG(data.getIMG());
		setALARM(data.getALARM());
		setSTATUSNAME(data.getSTATUSNAME());
		setNAME(data.getNAME());
		setOFFCOMNAME(data.getOFFCOMNAME());
		setGATHERTIME(data.getGATHERTIME());
		setNO(data.getNO());
		setADDRESS(data.getADDRESS());
		setPOSITION(data.getPOSITION());


	}
}
